/*
 * Copyright (C) 2015-2018 Alibaba Group Holding Limited
 */

#include <k_api.h>
#include <aos/kernel.h>

void hal_loop_task_setspecific(unsigned int key, void *ctx)
{
    krhino_task_info_set(krhino_cur_task_get(), key, ctx);
}

void *hal_loop_task_getspecific(unsigned int key)
{
    void *ctx = NULL;

    krhino_task_info_get(krhino_cur_task_get(), key, &ctx);
    return ctx;
}

int hal_loop_task_key_create(unsigned int *key)
{
    return aos_task_key_create(key);
}

void hal_loop_task_key_delete(unsigned int key)
{
    aos_task_key_delete(key);
}
